package com.zondy.mapgis.domain.psmap;

import com.zondy.mapgis.common.core.annotation.Excel;
import com.zondy.mapgis.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;

@Schema(
   name = "行政区划对象"
)
public class AppDistrict extends BaseEntity {
   private static final long serialVersionUID = 1L;
   @Schema(
      description = "ID"
   )
   private Long districtId;
   @Schema(
      description = "行政区划代码"
   )
   @Excel(
      name = "行政区划代码"
   )
   private String code;
   @Schema(
      description = "行政区划名称"
   )
   @Excel(
      name = "行政区划名称"
   )
   private String name;
   @Schema(
      description = "年度"
   )
   @Excel(
      name = "年度"
   )
   private Integer year;
   @Schema(
      description = "级别"
   )
   @Excel(
      name = "级别"
   )
   private Integer level;
   @Schema(
      description = "范围"
   )
   @Excel(
      name = "范围"
   )
   private String bound;
   @Schema(
      description = "几何JSON"
   )
   @Excel(
      name = "几何JSON"
   )
   private String geoJson;
   @Schema(
      description = "标注点"
   )
   @Excel(
      name = "标注点"
   )
   private String labelPoint;
   private String state;
   private List<AppDistrict> children;

   public Long getDistrictId() {
      return this.districtId;
   }

   public String getCode() {
      return this.code;
   }

   public String getName() {
      return this.name;
   }

   public Integer getYear() {
      return this.year;
   }

   public Integer getLevel() {
      return this.level;
   }

   public String getBound() {
      return this.bound;
   }

   public String getGeoJson() {
      return this.geoJson;
   }

   public String getLabelPoint() {
      return this.labelPoint;
   }

   public String getState() {
      return this.state;
   }

   public List<AppDistrict> getChildren() {
      return this.children;
   }

   public AppDistrict setDistrictId(Long districtId) {
      this.districtId = districtId;
      return this;
   }

   public AppDistrict setCode(String code) {
      this.code = code;
      return this;
   }

   public AppDistrict setName(String name) {
      this.name = name;
      return this;
   }

   public AppDistrict setYear(Integer year) {
      this.year = year;
      return this;
   }

   public AppDistrict setLevel(Integer level) {
      this.level = level;
      return this;
   }

   public AppDistrict setBound(String bound) {
      this.bound = bound;
      return this;
   }

   public AppDistrict setGeoJson(String geoJson) {
      this.geoJson = geoJson;
      return this;
   }

   public AppDistrict setLabelPoint(String labelPoint) {
      this.labelPoint = labelPoint;
      return this;
   }

   public AppDistrict setState(String state) {
      this.state = state;
      return this;
   }

   public AppDistrict setChildren(List<AppDistrict> children) {
      this.children = children;
      return this;
   }

   public String toString() {
      return "AppDistrict(districtId=" + this.getDistrictId() + ", code=" + this.getCode() + ", name=" + this.getName() + ", year=" + this.getYear() + ", level=" + this.getLevel() + ", bound=" + this.getBound() + ", geoJson=" + this.getGeoJson() + ", labelPoint=" + this.getLabelPoint() + ", state=" + this.getState() + ", children=" + this.getChildren() + ")";
   }

   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof AppDistrict)) {
         return false;
      } else {
         AppDistrict other = (AppDistrict)o;
         if (!other.canEqual(this)) {
            return false;
         } else if (!super.equals(o)) {
            return false;
         } else {
            Object this$districtId = this.getDistrictId();
            Object other$districtId = other.getDistrictId();
            if (this$districtId == null) {
               if (other$districtId != null) {
                  return false;
               }
            } else if (!this$districtId.equals(other$districtId)) {
               return false;
            }

            Object this$year = this.getYear();
            Object other$year = other.getYear();
            if (this$year == null) {
               if (other$year != null) {
                  return false;
               }
            } else if (!this$year.equals(other$year)) {
               return false;
            }

            label119: {
               Object this$level = this.getLevel();
               Object other$level = other.getLevel();
               if (this$level == null) {
                  if (other$level == null) {
                     break label119;
                  }
               } else if (this$level.equals(other$level)) {
                  break label119;
               }

               return false;
            }

            label112: {
               Object this$code = this.getCode();
               Object other$code = other.getCode();
               if (this$code == null) {
                  if (other$code == null) {
                     break label112;
                  }
               } else if (this$code.equals(other$code)) {
                  break label112;
               }

               return false;
            }

            Object this$name = this.getName();
            Object other$name = other.getName();
            if (this$name == null) {
               if (other$name != null) {
                  return false;
               }
            } else if (!this$name.equals(other$name)) {
               return false;
            }

            Object this$bound = this.getBound();
            Object other$bound = other.getBound();
            if (this$bound == null) {
               if (other$bound != null) {
                  return false;
               }
            } else if (!this$bound.equals(other$bound)) {
               return false;
            }

            label91: {
               Object this$geoJson = this.getGeoJson();
               Object other$geoJson = other.getGeoJson();
               if (this$geoJson == null) {
                  if (other$geoJson == null) {
                     break label91;
                  }
               } else if (this$geoJson.equals(other$geoJson)) {
                  break label91;
               }

               return false;
            }

            Object this$labelPoint = this.getLabelPoint();
            Object other$labelPoint = other.getLabelPoint();
            if (this$labelPoint == null) {
               if (other$labelPoint != null) {
                  return false;
               }
            } else if (!this$labelPoint.equals(other$labelPoint)) {
               return false;
            }

            Object this$state = this.getState();
            Object other$state = other.getState();
            if (this$state == null) {
               if (other$state != null) {
                  return false;
               }
            } else if (!this$state.equals(other$state)) {
               return false;
            }

            Object this$children = this.getChildren();
            Object other$children = other.getChildren();
            if (this$children == null) {
               if (other$children != null) {
                  return false;
               }
            } else if (!this$children.equals(other$children)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof AppDistrict;
   }

   public int hashCode() {
      boolean PRIME = true;
      int result = super.hashCode();
      Object $districtId = this.getDistrictId();
      result = result * 59 + ($districtId == null ? 43 : $districtId.hashCode());
      Object $year = this.getYear();
      result = result * 59 + ($year == null ? 43 : $year.hashCode());
      Object $level = this.getLevel();
      result = result * 59 + ($level == null ? 43 : $level.hashCode());
      Object $code = this.getCode();
      result = result * 59 + ($code == null ? 43 : $code.hashCode());
      Object $name = this.getName();
      result = result * 59 + ($name == null ? 43 : $name.hashCode());
      Object $bound = this.getBound();
      result = result * 59 + ($bound == null ? 43 : $bound.hashCode());
      Object $geoJson = this.getGeoJson();
      result = result * 59 + ($geoJson == null ? 43 : $geoJson.hashCode());
      Object $labelPoint = this.getLabelPoint();
      result = result * 59 + ($labelPoint == null ? 43 : $labelPoint.hashCode());
      Object $state = this.getState();
      result = result * 59 + ($state == null ? 43 : $state.hashCode());
      Object $children = this.getChildren();
      result = result * 59 + ($children == null ? 43 : $children.hashCode());
      return result;
   }
}
